class CreateMergeHistories < ActiveRecord::Migration
  def self.up

    #Create a table to record all history when merge operation a fragment to a novel.
    #Record which fragment is merged to which novel at which fragment_number
    create_table :merges do |t|
      t.column :chapter_id, :integer, :null=>false
      t.column :fragment_id, :integer, :null=>false
      t.column :user_id, :integer, :null=>true
      t.timestamps
    end
  end

  def self.down
    drop_table :merges
  end
end
